package de.baumann.browser.base;

import java.lang.ref.SoftReference;

import de.baumann.browser.iview.IBaseView;

public class BasePresenter<V extends IBaseView> {

    private SoftReference<V> softReference;

    public void bind(V view) {
        softReference = new SoftReference<>(view);
    }

    public void unBind() {
        if (softReference != null) {
            softReference.clear();
        }
    }

    public V getView() {
        return softReference.get();
    }

}
